package com.example.personnel_oa.dubbo;

import com.example.comment_oa.dubbo.DimissionServiceDubbo;
import com.example.comment_oa.pojos.Dimission;
import com.example.personnel_oa.service.DimissionService;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;

@DubboService(version = "1.0.0",protocol = "${dubbo.protocol.id}",
        application = "${dubbo.application.id}",registry = "${dubbo.registry.id}",
        timeout = 3000)
public class DimissionServiceDubboImpl implements DimissionServiceDubbo {
    @Resource
    DimissionService dimissionService;

    //新增离职申请
    @Override
    public int shenqinglizhi(Dimission dimission) {
        int shenqinglizhi = dimissionService.shenqinglizhi(dimission);
        return shenqinglizhi;
    }

    //离职审批成功
    @Override
    public int dimState(String dimName, String dimBianhao) {
        int i = dimissionService.dimState(dimName, dimBianhao);
        return i;
    }

    //离职审批失败
    @Override
    public int dimStates(String dimName, String dimBianhao) {
        int i = dimissionService.dimStates(dimName, dimBianhao);
        return i;
    }
}
